Virtual robot image presentation method and apparatus

ABSTRACT

A virtual robot image presentation method and an apparatus are provided to improve virtual robot utilization and user experience. In this method, an electronic device generates a first virtual robot image, and presents the first virtual robot image. The first virtual robot image is determined by the electronic device based on scene information. The scene information includes at least one piece of information in first information and second information, the first information is used to represent a current time attribute, and the second information is used to represent a type of an application currently running in the electronic device. According to the foregoing method, in a human-machine interaction process, virtual robot images can be richer and more vivid, so that user experience can be better, thereby improving virtual robot utilization of a user.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Patent ApplicationNo. PCT/CN2019/101843, filed on Aug. 21, 2019, which claims priority toChinese Patent Application No. 201810996405.3, filed on Aug. 29, 2018.The disclosures of the aforementioned applications are herebyincorporated by reference in their entireties.

TECHNICAL FIELD

This application relates to the field of information technologies, andin particular, to a virtual robot image presentation method and anapparatus.

BACKGROUND

With the continuous development of computer networks, human-machineinteraction becomes a hotspot. Human-machine interaction is applied tovarious scenarios, mainly including various robot interfaces,intelligent customer service systems, personal assistant services,intelligent assistants, voice assistants, and the like. Human-machineinteraction in the various scenarios may be implemented by using avirtual robot (an existing intelligent assistant, an existing smartassistant, an existing voice assistant, an existing personal assistant,and the like each may be referred to as a virtual robot). An objectiveof human-machine interaction is to eventually implement emotionalcommunication between a human and a computer as between humans, togenerate continuous interactive attraction between the human and thevirtual robot.

However, in a current human-machine interaction process, a virtual robotmostly faces a user with a single image, and merely helps, from aninformation feedback level, the user to complete a target instruction,but has not been capable of emotionally resonating with the user. Thisleads to low virtual robot utilization and poor human-machineinteraction experience.

SUMMARY

This application provides a virtual robot image presentation method andan apparatus, to improve virtual robot utilization and user experience.

According to a first aspect, this application provides a virtual robotimage presentation method, applied to an electronic device having ascreen. The electronic device generates a first virtual robot image, andpresents the first virtual robot image. The first virtual robot image isdetermined by the electronic device based on scene information. Thescene information includes at least one piece of information in firstinformation and second information, the first information is used torepresent a current time attribute, and the second information is usedto represent a type of an application currently run in the electronicdevice.

According to the foregoing method, in a human-machine interactionprocess, a virtual robot image may be generated based on a timeattribute and/or a type of an application currently used in theelectronic device, so that various images can be obtained based ondifferent times and/or different types of currently used apps.Therefore, virtual robot images can be enriched, so that user experiencecan be better, and virtual robot utilization of a user can be improved.

In an embodiment, the scene information further includes thirdinformation, and the third information is used to represent a naturalenvironment. In this way, the electronic device may generate the firstvirtual robot image not only with reference to the current timeattribute and/or the type of the currently used app, but also withreference to a current natural environment in which the electronicdevice is located, so that the first virtual robot image is richer andmore vivid.

The electronic device may determine the first virtual robot image basedon the obtained scene information after obtaining the scene information.

When the scene information includes only one piece of information, theone piece of information (namely, the one piece of scene information) isthe first information or the second information, and the electronicdevice may determine, according to a preset mapping relationship betweenscene information and a virtual robot image, a virtual robot imagecorresponding to the one piece of scene information, and directly usethe determined virtual robot image as the first virtual robot image.When the scene information includes a plurality of pieces ofinformation, the electronic device may separately determine, accordingto a preset mapping relationship between scene information and a virtualrobot image, a virtual robot image corresponding to each of theplurality of pieces of scene information, and finally generate the firstvirtual robot image by merging the determined plurality of virtual robotimages, so that the generated first virtual robot image can adapt todifferent scene information.

According to the foregoing method, the electronic device can accuratelygenerate the first virtual robot image, and the generated first virtualrobot image combines features of a plurality of pieces of information,so that the first virtual robot image can be relatively vivid.

In an embodiment, a mapping relationship of a virtual robot image may bepre-stored, and the mapping relationship includes virtual robot imagescorresponding to different scene information. In this way, theelectronic device can search the mapping relationship based on one pieceof scene information, to accurately find a corresponding virtual robotimage.

In an embodiment, the electronic device may further select the firstvirtual robot image suitable for the user from virtual robot imagesbased on personalized information (for example, social information,shopping information, and a physiological feature, which may also beused as one or more types of scene information) of a user. In this way,a subsequently presented virtual robot image can better resonate withthe user, so that user experience can be better.

In an embodiment, after the electronic device presents the first virtualrobot image, when detecting an input operation of the user, theelectronic device may further determine instruction information of theuser based on the input operation, determine, according to a presetmapping relationship between instruction information and a virtual robotimage, a second virtual robot image corresponding to the instructioninformation, then generate a third virtual robot image by merging thepresented first virtual robot image and the newly determined secondvirtual robot image, and replace the presented first virtual robot imagewith the third virtual robot image to update presentation, where thethird virtual robot image reflects scene information corresponding tothe first virtual robot image and the instruction informationcorresponding to the second virtual robot image.

According to the foregoing method, a virtual robot image can constantlyadapt to user emotion in the human-machine interaction process, so thatuser experience is better.

In an embodiment, the input operation includes one or more of thefollowing operations: a voice input, a text input, a touch operation,and the like. In this way, the electronic device can detect the inputoperation of the user in a plurality of manners.

In an embodiment, before the electronic device generates the firstvirtual robot image, the electronic device may further turn on a virtualrobot according to a user instruction, and enable the virtual robot toenter a wait mode. In this way, the virtual robot may be presented tothe user first with a default virtual robot image, and subsequently, thevirtual robot image is updated constantly based on an actual status (forexample, different scene information).

In an embodiment, the third information may be one or more of thefollowing: weather information, temperature information, and the like.The weather information may include, but not limited to, one or more ofthe following: normal weather information, extreme weather information,alarm weather information, current air quality information, and airquality change information. The temperature information may include, butnot limited to, one or more of the following: current temperatureinformation and temperature change information. The air quality changeinformation may include one or more of the following: information aboutan air quality change caused by a location change and information aboutan air quality change caused by a time change. The temperature changeinformation may include one or more of the following: information abouta temperature change caused by a location change and information about atemperature change caused by a time change. In this way, when a virtualrobot image is determined, the virtual robot image can adapt todifferent scene information, so that the virtual robot image can bericher, and user experience can be better.

In an embodiment, the first information may be, but not limited to, oneor more of the following: festival information and current time periodinformation. The second information may be, but not limited to, one ormore of a reading type, a music type, an information query type, and adefault no-operation type. In this way, when a virtual robot image isdetermined, the virtual robot image can adapt to different sceneinformation, so that the virtual robot image can be richer, and userexperience can be better.

In an embodiment, any virtual robot image (including the first virtualrobot image, the second virtual robot image, and the third virtual robotimage) may be a static image or a dynamic image. In this way, thevirtual robot image can be more flexible.

According to a second aspect, an embodiment of this application furtherprovides an electronic device. The electronic device has a function ofimplementing behavior of the electronic device in the method example.The function may be implemented by using hardware, or may be implementedby hardware executing corresponding software. The hardware or softwareincludes one or more modules corresponding to the foregoing function.

In a possible implementation, a structure of the electronic deviceincludes a processing unit and a display unit, and may further include acommunications unit and the like. The units may perform thecorresponding function in the method example. For details, refer to thedetailed descriptions in the method example. Details are not describedherein again.

In an embodiment, the structure of the electronic device includes aprocessor and a screen, and may further include a communications moduleand a memory. The communications module is configured to obtain sceneinformation. The screen is configured to present a virtual robot image.The processor is configured to support the electronic device inperforming the corresponding function in the method. The memory iscoupled to the processor, and stores a program instruction and data thatare necessary for the electronic device.

In an embodiment, the electronic device includes a processor and amemory that are connected to each other, the processor is configured toread and execute a program instruction stored in the memory, to performthe method in any possible design of the first aspect.

According to a third aspect, an embodiment of this application furtherprovides a computer storage medium, where the computer storage mediumstores a computer executable instruction, and when the computerexecutable instruction is invoked by a computer, the computer is enabledto perform the method in any possible design of the first aspect.

According to a fourth aspect, an embodiment of this application furtherprovides a computer program product including an instruction, where whenthe computer program product is run in an electronic device, theelectronic device is enabled to perform the method in any possibledesign of the first aspect.

According to a fifth aspect, an embodiment of this application furtherprovides an electronic device. The electronic device may be a chip, andthe chip is connected to a memory, and is configured to read and executea program instruction stored in the memory, to implement the method inany possible design of the first aspect.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a structural diagram of an electronic device according to thisapplication;

FIG. 2 is a flowchart of a virtual robot image presentation methodaccording to this application;

FIG. 3 is a schematic diagram of a virtual robot image according to thisapplication;

FIG. 4 is a schematic diagram of another virtual robot image accordingto this application;

FIG. 5 is a schematic diagram of another virtual robot image accordingto this application;

FIG. 6 is a schematic diagram of another virtual robot image accordingto this application;

FIG. 7 is a schematic diagram of another virtual robot image accordingto this application;

FIG. 8 is a schematic diagram of another virtual robot image accordingto this application;

FIG. 9 is a schematic diagram of another virtual robot image accordingto this application;

FIG. 10 is a schematic diagram of another virtual robot image accordingto this application;

FIG. 11 is a schematic diagram of another virtual robot image accordingto this application;

FIG. 12 is a schematic diagram of another virtual robot image accordingto this application;

FIG. 13 is a schematic diagram of another virtual robot image accordingto this application;

FIG. 14 is a schematic diagram of another virtual robot image accordingto this application;

FIG. 15 is a flowchart of an example of a virtual robot imagepresentation method according to this application;

FIG. 16 is a schematic structural diagram of an electronic deviceaccording to this application; and

FIG. 17 is a structural diagram of an electronic device according to anembodiment of this application.

DESCRIPTION OF EMBODIMENTS

The following further describes in detail this application withreference to accompanying drawings.

Embodiments of this application provide a virtual robot imagepresentation method and an apparatus, to improve virtual robotutilization and user experience. The method and the apparatus in thisapplication are based on a same inventive idea. Because problemresolving principles of the method and the apparatus are similar, mutualreference may be made to implementations of the apparatus and themethod, and repeated parts are not described.

In the following, some terms in this application are described, so as tohelp persons skilled in the art have a better understanding.

1. A virtual robot image is a displayed specific form, posture, emotion,portrait, and the like of a virtual robot. The virtual robot is avirtual person, and can interact with a person. For example, the virtualrobot may be an existing common intelligent assistant, smart assistant,voice assistant, personal assistant, or the like. It should be notedthat with the development, a future virtual robot may be alternativelyin another representation form. This is not limited in this application.

2. An electronic device may be a device that has a screen and that candisplay a virtual robot image. Optionally, the electronic device may bea terminal device. For example, the terminal device may be a mobilephone, a notebook computer, a tablet computer, a vehicle-mountedcomputer, a personal digital assistant (PDA), a smartwatch, a personalcomputer (PC), a television, or the like. Certainly, the electronicdevice is not limited to the foregoing listed terminal devices. This isnot limited in this application.

The electronic device may support a plurality of applications, forexample, some or all of a text processing application, a telephoneapplication, an e-mail application, an instant messaging application, aphoto management application, a web browsing application, a digitalmusic player application, a digital video player application, and thelike.

3. The term “and/or” describes an association relationship fordescribing associated objects and represents that three relationshipsmay exist. For example, A and/or B may represent the following threecases: Only A exists, both A and B exist, and only B exists. Thecharacter “/” generally indicates an “or” relationship between theassociated objects.

4. “A plurality of” refers to two or more than two.

5. In the descriptions of this application, terms such as “first” and“second” are merely for the purpose of differentiating betweendescriptions, but cannot be understood as indicating or implyingrelative importance, and cannot be understood as indicating or implyinga sequence.

To describe the technical solutions in the embodiments of thisapplication more clearly, the following describes, in detail withreference to the accompanying drawings, the virtual robot imagepresentation method and the apparatus that are provided in theembodiments of this application.

FIG. 1 shows a virtual robot image presentation apparatus according toan embodiment of this application. The apparatus is applied to anelectronic device. FIG. 1 is a block diagram of a partial structure ofthe electronic device related to this embodiment of this application. Asshown in FIG. 1 , an electronic device 100 includes components such as acommunications unit 110, a power supply 120, a processor 130, a memory140, an input unit 150, and an output unit 160. A person skilled in theart may understand that the structure of the electronic device shown inFIG. 1 does not constitute any limitation to the electronic device, andmore or fewer components than those shown in the figure may be included,or some components may be combined, or a different component arrangementmay be used.

The following introduces constitution components of the electronicdevice 100 with reference to FIG. 1 .

The communications unit 110 may provide a voice or data communicationcapability, and may provide a wired or wireless communication interface.Optionally, the communications unit 110 may include some or all of aradio frequency (RF) transceiver element, a global positioning system(GPS) transceiver element (for example, an RF circuit 111 shown in FIG.1 ), a wireless fidelity (Wi-Fi) element (for example, a Wi-Fi module112 shown in FIG. 1 ), and another element. The communications unit 110may be alternatively a combination of software and hardware (forexample, an antenna, a modem, a codec, and an analog/digital processingcircuit).

The RF circuit 111 may be configured to implement data receiving andsending in an information receiving and sending process or in a callingprocess. Particularly, after receiving downlink data of a base station,the RF circuit 111 sends the downlink data to the processor 130 forprocessing, and sends to-be-sent uplink data to the base station.Generally, the RF circuit 111 includes, but not limited to, an antenna,at least one amplifier, a transceiver, a coupler, a low noise amplifier(LNA), and a duplexer. In addition, the RF circuit 111 may furthercommunicate with a network and another device through wirelesscommunication. The wireless communication may use any communicationsstandard or protocol, including, but not limited to, global system formobile communications (GSM), general packet radio service (GPRS), codedivision multiple access (CDMA), wideband code division multiple access(WCDMA), long term evolution (LTE), e-mail, and short messaging service(SMS).

Wi-Fi belongs to a short range wireless communications technology, andthe electronic device 100 may be connected to an access point (AP) byusing the Wi-Fi module 112, to access a data network. The Wi-Fi module112 may be configured to implement data receiving and sending in aprocess of communicating with another device.

The memory 140 may be configured to store a software program and amodule. The processor 130 runs the software program and the module thatare stored in the memory 140, to implement various function applicationsand data processing of the electronic device 100. Optionally, the memory140 may mainly include a program storage region and a data storageregion. The program storage region may store an operating system,various applications, and the like. The data storage region may storedata and the like created based on use of the electronic device 100.Optionally, the memory 140 may further store static data (for example,an image), a rule, and the like that are required by the processor 130and another module. For example, in this embodiment of this application,the memory 140 may store a mapping relationship between a virtual robotimage and each of first information, second information, and thirdinformation. In addition, the memory 140 may include a high speed randomaccess memory, and may further include a non-volatile memory, forexample, at least one disk storage device, a flash memory, or anothernon-volatile solid state storage device.

It should be noted that a function of the memory 140 may be reflected inthe electronic device 100 shown in FIG. 1 , or may be implemented in acloud server or the like. Description is provided herein by using a partof the electronic device 100 as an example, and this does not limit thememory.

The input unit 150 may be configured to receive input digit or characterinformation, and generate a button signal input related to user settingand function control of the electronic device 100. The input unit 150may include a touch panel 151 and another input device 152.

The touch panel 151 may be alternatively referred to as a touchscreen,may collect a touch operation of a user on or near the touch panel (forexample, an operation of the user on the touch panel 151 or near thetouch panel 151 by using any suitable object or accessory such as afinger, a stylus, or the like), and drive a corresponding connectionapparatus according to a preset formula. Optionally, the touch panel 151may include two parts, namely, a touch detection apparatus and a touchcontroller. The touch detection apparatus detects a touch orientation ofthe user, detects a signal generated by the touch operation, and sendsthe signal to the touch controller. The touch controller receives touchinformation from the touch detection apparatus, converts the touchinformation into touch point coordinates, sends the touch pointcoordinates to the processor 130, and can receive and execute a commandsent by the processor 130. For example, when the user touches, on thetouch panel 151 by using a hand, a virtual robot image displayed on ascreen 1611, the touch detection apparatus detects a signal generated bythe touch, and then sends the signal to the touch controller. Then, thetouch controller converts the signal into coordinates, and sends thecoordinates to the processor 130. The processor 130 determines, based onthe coordinates and a type of the signal (touch), an operation (imageupdate) performed on the virtual robot image. Then, the processor 130instructs to update the virtual robot image.

In addition, the touch panel 151 may be implemented in a resistive form,a capacitor form, an infrared form, a surface acoustic wave form, or thelike.

Optionally, the another input device 152 may include, but not limitedto, one or more of a physical keyboard, a functional button (forexample, a volume control button, or a switch button), a trackball, amouse, a joystick, and the like.

The output unit 160 may be configured to output various information usedfor user interaction or provided for the user. Optionally, the outputunit 160 may include a display unit 161 and a loudspeaker 162 (which maybe used to provide a voice output), and may further include a vibratingmotor (which may be used to provide vibrating feedback) and the like.

The display unit 161 may be configured to display information input bythe user, information provided for the user, and various menus of theelectronic device 100. The display unit 161 is a display system of theelectronic device 100, and is configured to present an interface, andimplement human-machine interaction. For example, when the input unit150 receives an instruction of the user for human-machine interaction,the input unit 150 transmits the instruction to the processor 130, andthen the processor 130 displays a virtual robot image (the virtual robotimage may be displayed by using the screen 1611) by using the displayunit 161 according to the instruction, so that the user sees the virtualrobot image, to implement human-machine interaction.

The display unit 161 may include the screen 1611. Optionally, the screen1611 may be configured by using a liquid crystal display (LCD), anorganic light-emitting diode (OLED), or the like. Further, the touchpanel 151 may cover the screen 1611. After detecting a touch operationon or near the touch panel 151, the touch panel 151 sends the touchoperation to the processor 130, to determine a type of a touch event.Subsequently, the processor 130 provides a corresponding visual outputon the screen 1611 based on the type of the touch event. For example,after detecting an operation of fondling, by the user, a virtual roboton the touch panel 151, the touch panel 151 sends the operation to theprocessor 130. The processor 130 determines a type of a touch event asfondling, and displays, on the screen 1611, a virtual robot imagecorresponding to fondling, for example, the fondled virtual robot may bea robot image with a shy look, to present a changing virtual robotimage.

Although in FIG. 1 , the touch panel 151 and the screen 1611 implementinput and output functions of the electronic device 100 as twoindependent components, in some embodiments, the touch panel 151 and thescreen 1611 may be integrated, to implement the input and outputfunctions of the electronic device 100.

The processor 130 is a control center of the electronic device 100,connects all parts of the entire electronic device by using variousinterfaces and lines, and performs various functions and data processingof the electronic device 100 by running or executing the softwareprogram and/or module stored in the memory 140 and invoking the datastored in the memory 140, to implement various services based on theelectronic device. Optionally, the processor 130 may include one or moreprocessing units. The processor 130 may integrate an applicationprocessor and a modem processor. The application processor mainlyprocesses an operating system, a user interface, an application, and thelike, and the modem processor mainly processes wireless communication.It may be understood that the modem processor may not be integrated intothe processor 130. For example, in this application, the processor 130may include a display drive unit. After the processor 130 generates avirtual robot image, the processor 130 may control, by using the displaydrive unit, the screen 1611 to present the virtual robot image. Foranother example, the memory 140 stores a display driver, and theprocessor 130 may invoke the driver in the memory 140, to control thescreen 1611 to present a virtual robot image.

The electronic device 100 further includes the power supply 120 (forexample, a battery) supplying power to the components. Optionally, thepower supply 120 may be logically connected to the processor 130 byusing a power supply management system, to implement, by using the powersupply management system, functions of managing charging, discharging,power consumption, and the like.

It should be noted that although not shown in FIG. 1 , the electronicdevice 100 may further include a camera, a Bluetooth module, an audiocircuit, a microphone, a sensor, and the like. Details are not describedherein again.

An embodiment of this application provides a virtual robot imagepresentation method, applied to the electronic device 100 shown in FIG.1 . Therefore, this embodiment of this application is merely describedby using the electronic device 100 as an example. As shown in FIG. 2 , aspecific process of the virtual robot image presentation method providedin this embodiment of this application includes the following steps:

Step 201. The processor 130 of the electronic device 100 generates afirst virtual robot image. The first virtual robot image is generated bythe processor 130 based on scene information. The scene informationincludes at least one piece of information in first information andsecond information, the first information is used to represent a currenttime attribute, and the second information is used to represent a typeof an application currently run in the electronic device 100.

In this application, a virtual robot image has a feature capable ofreflecting scene information. For example, if the first information isthe dragon boat festival, the feature of the virtual robot image may bea feature related to a dragon boat and a traditional Chineserice-pudding. Alternatively, if the second information is a musicapplication, the feature of the virtual robot image may be a featurerelated to a microphone, a disc, an earphone, and the like. A specificdesign of the virtual robot image is not limited provided that a featurerelated to the scene information can be presented.

In an embodiment, before the processor 130 generates the first virtualrobot image, the electronic device 100 may receive, by using the inputunit 150, a user instruction input by a user, and the processor 130turns on a virtual robot according to the instruction, and enables thevirtual robot to enter a wait mode. In an embodiment, the userinstruction may be an instruction of activating the electronic device100, an instruction of the user for turning on a screen of theelectronic device 100, an instruction of the user for unlocking theelectronic device 100, an instruction of the user for waking up thevirtual robot, or the like. After the electronic device 100 receives theuser instruction, the electronic device 100 turns on the virtual robot.For example, the user turns on the electronic device 100, and activatesthe electronic device 100 by pressing a button, entering a password,inputting a fingerprint, or the like.

In an embodiment, after the virtual robot enters the wait mode, theprocessor 130 may first control the screen 1611 to present a defaultvirtual robot image of a system, and subsequently, constantly update thepresented virtual robot image based on the scene information.

In an embodiment, the first information may be one or more of thefollowing: festival information, current time period information, andthe like. For example, the festival information may include a globalfestival, a special festival of each country, a special festival relatedto the user, and the like. The global festival, for example, is the NewYear's Day, the Christmas day, the Valentine's Day, the Halloween, orthe like. The special festival of each country, for example, is Chineselantern festival, Chinese dragon boat festival, or the like. The specialfestival related to the user, for example, is the birthday, the weddinganniversary, or the like of the user. For example, the current timeperiod information may be classified into three main time periods,namely, a working time period, a dining time period, and a sleeping timeperiod. For example, default working time periods may be: 08:00 to11:30, 12:30 to 17:30, and 18:30 to 22:30, default dining time periodsmay be 11:30 to 12:30 and 17:30 to 18:30, and a default sleeping timeperiod may be 22:30 to 08:00. Optionally, the time period informationmay be set by the user in the electronic device 100, and stored by theprocessor 130 in the memory 140. In other words, the time periodinformation may be defined by the user. It should be noted that theforegoing festival information and time period information are merelyexamples, and other festival information or other time periodinformation may be further included. This is not limited in thisapplication.

In an embodiment, the second information may be one or more of thefollowing: a reading type, a music type, an information query type, adefault no-operation type, and the like. For example, an application ofthe reading type may include reading an e-book, browsing content such asa web page, microblog, and news, and the like. The music type mayinclude a running music application, and a case of playing back a song.The information query type may include a case of opening an input box ofa browser and the like, a case of entering a key word in any search box,and the like. The default no-operation type may be a case in which noapplication is currently opened in the electronic device 100. It shouldbe noted that descriptions of the foregoing types are merely examples,and a plurality of other cases may be further included. This is notlimited in this application.

In an embodiment, the scene information may further include thirdinformation, and the third information is used to represent a naturalenvironment. Optionally, the third information may be one or more of thefollowing: weather information and temperature information. For example,the weather information may include one or more of the following: normalweather information, extreme weather information, alarm weatherinformation, current air quality information, and air quality changeinformation. The temperature information may include one or more of thefollowing: current temperature information and temperature changeinformation. The air quality change information may include one or moreof the following: information about an air quality change caused by alocation change and information about an air quality change caused by atime change. The temperature change information may include one or moreof the following: information about a temperature change caused by alocation change and information about a temperature change caused by atime change.

The normal weather information may include common weather such as asunny day, a cloudy day, a rainy day, and a snowy day. The extremeweather information may include smog, a rainstorm, hail, a temperaturehigher than 38 degrees centigrade, a temperature lower than minus 10degrees centigrade, and the like. The alarm weather information may beinformation about an emergent weather alarm such as typhoon. The currentair quality information may be a PM2.5 value, a PM10 value, and thelike.

For example, the location change may be a change caused when an addresslocation changes greatly, or may be an indoor-outdoor change, or may beanother location change. For example, the information about the airquality change caused by the location change may be information about adifference between indoor air quality and outdoor air quality. Forexample, a difference between an indoor PM2.5 value and an outdoor PM2.5value is greater than 50. For another example, the information about thetemperature change caused by the location change may be informationabout a temperature difference between cities, or may be informationabout a difference between an indoor temperature and an outdoortemperature, or the like.

For example, the foregoing time change may be a change from a previousday to today, or may be a change between different time periods in aday, or may be another time change. For example, the information aboutthe air quality change caused by the time change may be informationabout an air quality change between yesterday and today. For anotherexample, the information about the temperature change caused by the timechange may be information about a temperature difference between alowest temperature of yesterday and an estimated lowest temperature oftoday and information about a temperature difference between a highesttemperature of yesterday and an estimated highest temperature of today,or may be information about a difference between temperatures at 8:00 AMand 15:00 PM.

In a process of generating, by the electronic device 100, the firstvirtual robot image, the electronic device 100 may collect current sceneinformation in various manners. For example, the electronic device 100collects current time information by using a clock module, compares thecurrent time information with calendar information stored in the memory140, and finds information about a corresponding festival; or collects acurrent room temperature by using a sensor; or collects, by using theprocessor 130, information about a type of an application currently usedin the electronic device 100; or collects, by using the processor 130,information about a weather status provided by weather softwareinstalled in the electronic device 100. Then, the electronic device 100generates the first virtual robot image based on the currently obtainedscene information.

In an embodiment, when obtaining the scene information, the electronicdevice 100 may obtain system information, or collect informationprovided by a third-party content provider, or the like. The electronicdevice 100 may obtain different scene information by using differentmethods. For example, that the electronic device 100 obtains the firstinformation may be that the electronic device 100 may collect festivalinformation provided in a Chinese lunar calendar application (or anothercalendar application); or that the electronic device 100 may collecttime period information corresponding to a user schedule recorded in asystem; or the like. For another example, that the electronic device 100obtains the third information may be that the electronic device 100 maycollect weather information provided in the Moji weather application (oranother weather application); or that the electronic device 100 mayobtain temperature information from a sensor (for example, a temperaturesensor) of the electronic device 100, or that the electronic device 100obtains temperature information from a smart home device (for example, adevice capable of measuring a room temperature) connected to theelectronic device 100; or that the electronic device 100 may obtain airquality information from a smart home device, namely, an air purifier,connected to the electronic device 100. For another example, that theelectronic device 100 obtains the second information may be that theelectronic device 100 identifies a type of an application currently runin the electronic device 100, namely, identifies an activity that isexecuted by the electronic device 100 when the user turns on the virtualrobot. For example, when the user currently opens an e-book or browsescontent such as a web page, microblog, or news, the electronic device100 obtains the reading type. For another example, when the user opens amusic application or plays back a song, the electronic device 100obtains the music type. For another example, when the user opens abrowser, and presses an input box or enters a search key word in asearch box, the electronic device 100 obtains the information querytype. For another example, when the user does not open any application,or perform any operation (for example, the user directly turns on thevirtual robot on a main interface of the electronic device 100, or theuser turns on the virtual robot through voice), the electronic device100 obtains the default no-operation type.

To sum up, because the scene information may include only one piece ofinformation or include a plurality of pieces of information, that theelectronic device 100 determines the first virtual robot image based onthe obtained scene information may be divided into the following twocases:

In a first case, when the scene information includes only one piece ofinformation, the electronic device 100 directly generates the firstvirtual robot image based on the scene information. The one piece ofinformation may be any one piece of information in the firstinformation, the second information, and the third information.

In a second case, when the scene information includes the plurality ofpieces of information, the electronic device 100 separately determines,according to a preset mapping relationship between scene information anda virtual robot image, a virtual robot image corresponding to each ofthe plurality of pieces of scene information, and then generate thefirst virtual robot image by merging the determined plurality of virtualrobot images. Optionally, the plurality of pieces of information may bea plurality of pieces of information in the first information, thesecond information, and the third information.

In an example implementation, in the foregoing two cases, whendetermining a virtual robot image corresponding to any one piece ofinformation, the electronic device 100 may pre-establish a mappingrelationship between different virtual robot images and different sceneinformation. For example, the mapping relationship may be shown in thefollowing table 1.

TABLE 1 Mapping relationship between a virtual robot and sceneinformation Emotional Virtual feedback of a robot Scene informationvirtual robot image First Global Christmas day Role play 1 Cosplay 1information festival Halloween Role play 2 Cosplay2 Special Dragon boatRole play 3 Cosplay3 festival of festival each country Lantern festivalRole play 4 Cosplay4 Special Birthday/wedding Scattering Bless festivalanniversary flowers to send related to an blessings individual Workingtime 08:00 to 11:30; Default Neutral period 12:30 to 17:30; expression18:30 to 22:30 Dining time 11:30 to 12:30; Licking Food period 17:30 to18:30 Sleeping time 22:30 to 08:00 Yawning Idle period Second Music typeSinging while Music information wearing a headset Reading type WearingReading glasses Information query type Magnifying Browsing glass Defaultno-operation type Default Neutral expression Third TemperatureTemperature Trembling Cold information change plummeting (forinformation example, the temperature plummets by 10° C.) ExtremeTemperature Sweating Hot weather higher than 38° C. information SmogWearing a Smog mask Alarm Typhoon Mess Messy weather information

Some specific presentations of the virtual robot images in Table 1 maybe virtual robot images shown in FIG. 3 .

It should be noted that Table 1 merely lists virtual robot imagescorresponding to some information by way of example, and virtual robotimages corresponding to much information are not shown in Table 1, andare not listed herein. It should be noted that the virtual robot imagesare merely examples, and do not constitute any limitation to informationand a virtual robot image in this application. For example, anexpression of hot (hot) is not limited to the sweating in Table 1, andmay be alternatively eating an ice pop, sticking the tongue out,enjoying the air conditioner, enjoying the fan blowing, or the like.

In the foregoing two cases, because the first information, the secondinformation, or the third information included in the scene informationfurther includes at least one piece of sub-information, when any onepiece of scene information in the three pieces of information includesonly one piece of sub-information, the processor 130 of the electronicdevice 100 directly searches the mapping table 1 for a virtual robotimage corresponding to the scene information. When any one piece ofscene information in the three pieces of information includes aplurality of pieces of sub-information, the electronic device 100 mayfirst search the mapping table 1 for a virtual robot image correspondingto each piece of sub-information, then generate a new virtual robotimage by merging the found plurality of virtual robot images, and usethe new virtual robot image as a determined virtual robot imagecorresponding to the any one piece of scene information.

In an embodiment, the virtual robot image may be classified as a staticimage or a dynamic image. For example, an image of singing while wearinga headset in Table 1 is a dynamic image.

For example, in the foregoing first case, in a process of opening, bythe user, a music app to listen to music in the used electronic device100, when the input unit 150 of the electronic device 100 receives auser instruction of instructing to turn on the virtual robot, theprocessor 130 of the electronic device 100 determines a type of theapplication currently used in the electronic device as the music type,further determines, according to Table 1, that a virtual robot imagecorresponding to the music type is an image of singing while wearing aheadset (namely, Music), and uses the virtual robot image as the firstvirtual robot image, for example, as shown in FIG. 4 .

For another example, in the foregoing first case, after turning on theelectronic device 100, the user directly wakes up the virtual robot. Inthis case, the processor 130 of the electronic device 100 determinesthat a type of a current application is the default no-operation type.Then, the processor 130 determines, according to Table 1, a defaultexpression (Neutral) as the first virtual robot image (namely, a defaultvirtual robot image), for example, as shown in FIG. 5 .

For another example, in the foregoing first case, in a process ofopening, by the user, a reading app to read an e-book, when theprocessor 130 of the electronic device 100 receives a user instructionof instructing to turn on the virtual robot, the processor 130determines a type of the application currently used in the electronicdevice 100 as the reading type. Then, the processor 130 furtherdetermines, according to Table 1, an image that is of wearing glasses(Reading) and that corresponds to the reading type as the first virtualrobot image, for example, as shown in FIG. 6 .

For another example, the user wakes up the virtual robot when opening abrowser in the used electronic device 100 to search for information, theprocessor 130 of the electronic device 100 determines a type of acurrently used application as the information query type, and furtherdetermines, according to Table 1, an image that is of a magnifying glass(Browsing) and that corresponds to the information query type as thefirst virtual robot image, for example, as shown in FIG. 7 .

For another example, when the processor 130 of the electronic device 100detects, by using the temperature sensor, that an ambient temperature ofthe electronic device 100 plummets (for example, a temperaturedifference is 10° C.), the processor 130 further determines, accordingto Table 1, a trembling (Cold) image as the first virtual robot image,for example, as shown in FIG. 8 . The electronic device 100 may obtainan indoor temperature value by using the temperature sensor of theelectronic device 100 or a smart home device that can measure a roomtemperature and that is connected to the electronic device, may obtainan outdoor temperature value by using the temperature sensor of theelectronic device 100 or a weather server, and determine whether adifference between indoor and outdoor temperatures is greater than athreshold. For example, there is heating indoors in the north, an indoortemperature is 25 degrees centigrade, and an outdoor temperature is −25degrees centigrade. Alternatively, there is an air conditioner indoorsin summer, an indoor temperature is 18 degrees centigrade, and anoutdoor temperature is 33 degrees centigrade. This belongs to atemperature leap. In other words, the electronic device 100 obtains thetemperature change information. Then, when the user goes from indoors tooutdoors, the electronic device 100 can modify a presented virtual robotimage when obtaining temperature plummeting. For example, the electronicdevice updates the default expression shown in FIG. 5 with a tremblingimage shown in FIG. 8 . Optionally, the trembling may be replaced byusing a sneezing image or the like. This is not limited in thisapplication.

For another example, it is assumed that the processor 130 of theelectronic device 100 determines, in the morning according to a weatherapplication, that weather does not change obviously compared with aprevious day, that there is no extreme weather information, and thatthere is no alarm weather information. The electronic device 100 obtainsthe birthday of the user according to a date recorded in a calendar.Then, the electronic device determines an image of scattering flowers tosend blessings (Bless) as the first virtual robot image, for example, asshown in FIG. 9 .

For another example, it is assumed that the user wakes up the virtualrobot at 23:30 PM on November 20, and the processor 130 of theelectronic device 100 determines that current time period information isa sleeping time period. Then, the processor 130 determines a yawning(Idle2) image as the first virtual robot image, for example, as shown inFIG. 10 .

For another example, when the processor 130 of the electronic device 100determines that an ambient temperature of the electronic device 100plummets, and determines that current time period information is thebirthday of the user, the processor 130 generates a new virtual robotimage by merging the virtual robot images shown in FIG. 8 and FIG. 9 ,and presents the new virtual robot image. For example, blessings aresent in a trembling voice and flowers are scattered dynamically, forexample, as shown in FIG. 11 .

For another example, the electronic device 100 may obtain a PM2.5 valueby using a smart home device that can measure air quality and that isconnected to the electronic device 100, and may obtain an outdoor PM2.5value by using the weather server. The processor 130 determines whethera difference between indoor air quality and outdoor air quality isgreater than a threshold. For example, there is heavy smog, and anindoor PM2.5 value is 23 micrograms per cubic meter after indoor air ispurified by using an air purifier, but an outdoor PM2.5 value is 220micrograms per cubic meter. This belongs to an air quality leap. Then,when the user goes from indoors to outdoors with the electronic device100, the processor 130 obtains the air quality change information,namely, smog, and may further determine, according to Table 1, that thefirst virtual robot image may be an image of wearing a mask.

In an embodiment, when the plurality of pieces of information obtainedby the electronic device 100 correspond to a plurality of virtual robotimages, in addition to that the electronic device 100 may generate a newvirtual robot image by merging the plurality of virtual robot images,and then use the new virtual robot image as the first virtual robotimage, the electronic device 100 may further allow the user to select afavorite virtual robot image from the plurality of virtual robot images,and use, as the first virtual robot image, the virtual robot imageselected by the user. For example, if a current date corresponds to aplurality of festivals (the birthday and the dragon boat festival), theelectronic device 100 may generate a new virtual robot image by merginga virtual robot image corresponding to the birthday and a virtual robotimage corresponding to the dragon boat festival, or may allow the userto manually specify a specific virtual robot image for a specificfestival.

In an embodiment, virtual robot images of electronic devices 100 ofdifferent users may be determined based on personalized information (forexample, social information, shopping information, and physiologicalfeatures) of the users. In other words, the processor 130 of theelectronic device 100 may further determine a virtual robot image basedon personalized information of the user using the electronic device 100.For example, the processor 130 of the electronic device 100 may predictpossible responses of the user in different weather/temperatures basedon operation experience accumulated in a process of using, by the user,the electronic device 100, and determine corresponding virtual robotimages. As mentioned above, hot (Hot) may also be expressed as asweating image, an image of eating an ice pop, an image of sticking thetongue out, an image of enjoying the air conditioner, an image ofenjoying the fan blowing, or the like. For example, the processor 130 ofthe electronic device 100 may further obtain weight information of theuser, and select a virtual robot image based on the weight informationof the user. For example, if a weight exceeds 75 kilograms, theprocessor 130 determines that the user is relatively fatty and mayeasily sweat, and the electronic device 100 may select the sweatingimage as the virtual robot image. For another example, the processor 130obtains social information or shopping information of the user. Forexample, social photos published by the user usually include a dog, orthe user purchased a dog-related pet supply. Then, the processor 130 mayselect the image of sticking the tongue out as the virtual robot image.For another example, if the processor 130 determines that social photospublished by the user include a particular quantity of photos of eatingan ice pop, or determines that there is shopping information of icecreams or ice pops, the processor 130 may select the image of eating anice pop as the virtual robot image. For another example, the processor130 obtains shopping information of the user, for example, the userpurchased an air conditioner or a fan, or the processor 130 maydetermine, by comparing indoor and outdoor temperatures, whether theuser has used an air conditioner. Then, the processor 130 may select theimage of enjoying the air conditioner or enjoying the fan blowing as thevirtual robot image.

Step 202. The processor 130 of the electronic device 100 transmits thegenerated first virtual robot image to the screen 1611, and presents thefirst virtual robot image by using the screen 1611.

For example, that the electronic device 100 presents the first virtualrobot image may be that after generating the first virtual robot imageby using the method in step 201, the processor 130 of the electronicdevice 100 notifies the first virtual robot image to the screen 1611 ofthe output unit 160, so that the screen 1611 presents the first virtualrobot image. In an embodiment, when the first virtual robot image is adynamic image, if there is a voice output corresponding to the virtualrobot image in this case, the electronic device 100 may further playback a voice by using the loudspeaker 162 of the output unit 160 whenpresenting the virtual robot image by using the screen 1611. For asolution in which the electronic device 100 presents the first virtualrobot image, refer to FIG. 4 to FIG. 11 .

In an embodiment, after the electronic device 100 presents the firstvirtual robot image, the electronic device 100 may further perform thefollowing operations: After detecting an input operation of the user byusing the input unit 150, for example, the input operation may be avoice input implemented by using the another input device 152 (forexample, a microphone) or a text input or a touch operation implementedby using the touch panel 151, the processor 130 of the electronic device100 further determines instruction information of the user based on theinput operation, determines, according to a preset mapping relationshipbetween instruction information and a virtual robot image, a secondvirtual robot image corresponding to the instruction information, thengenerates a third virtual robot image by merging the first virtual robotimage and the second virtual robot image, and presents the third virtualrobot image by using the screen 1611.

In an embodiment, when the electronic device 100 determines theinstruction information of the user based on the input operation, aspecific determining method may be as follows:

When the input operation is a voice input, the processor 130 may analyzea speed, a tone, and a meaning that are produced when the user inputsinformation through voice, to determine the instruction information ofthe user. For example, when the user inputs “what is the date of theChristmas day this year?” in a gentle tone, the processor 130identifies, based on the meaning, that the user currently is asking aquestion to the virtual robot, and therefore, the processor 130determines that the instruction information of the user in this case isasking a question. For another example, after the virtual robot rapidlyand correctly answers the question, the user inputs “you are brilliant”in a relaxed tone, the processor 130 identifies, based on the meaning,that the user currently is praising the virtual robot. In this case, theprocessor 130 determines that the instruction information of the user inthis case is praising. For another example, when the virtual robotcannot answer the question of the user, the user inputs “why are you sostupid” through voice, and the processor 130 identifies, based on themeaning, that the user currently is rebuking the virtual robot. In thiscase, the processor 130 determines that the instruction information ofthe user in this case is rebuking.

When the input operation is a text input, the processor 130 maycomprehensively analyze text content based on text content entered bythe user and use of punctuation marks, and determine the instructioninformation of the user.

When the input operation is a touch operation, the processor 130 maydetermine an action intention of the user based on force of pressing, bythe user (for example, by using a finger of the user), the touch panel151 and a touch speed, and determine the instruction information of theuser. For example, when the user gently touches the virtual robot imageby using a finger pulp, the processor 130 may identify a current actionof the user as fondling. In this case, the processor 130 may determinethat the instruction information of the user in this case is fondling.For another example, when the user quickly presses the virtual robotimage with force by using a finger, the processor 130 identifies acurrent action of the user as knocking, and the processor 130 maydetermine that the instruction information of the user in this case isknocking.

In an example manner, when the user shakes a mobile phone, the processor130 identifies a current action of the user as shaking. In this case,the processor 130 may determine that the instruction information of theuser is shaking.

In another example manner, when a time difference between a moment ofprevious interaction of the user with the virtual robot and a currentmoment exceeds 10 seconds, the processor 130 automatically determinesthat current instruction information of the user is that there is nointeraction for a long time. The time difference, 10 seconds, is merelyan example, and the time difference may be other duration. This is notlimited in this application.

Certainly, in addition to the foregoing example, there may be aplurality of pieces of other instruction information. The information isnot listed in this application.

In an embodiment, a mapping relationship between different instructioninformation and different virtual robot images may be pre-established,and the mapping relationship is stored in the memory 140. The mappingrelationship between different instruction information and differentvirtual robot images may be stored in a form of a table, or may bestored based on another data structure. This is not limited herein. Forexample, a table used to represent the mapping relationship betweendifferent instruction information and different virtual robot images maybe shown in the following Table 2.

TABLE 2 Mapping relationship between a virtual robot image andinstruction information of a user Instruction information Emotionalfeedback of a of the user virtual robot Virtual robot image Asking aquestion Deep thinking Thinking Question Say what? Positive answer YesNegative answer No Appraising Shy Shyly Thanks You are welcome You arewelcome Rebuking Scared/grievance Scary movie Fondling Happy Special dayKnocking Angry Angry There is no interaction Dozing Idle2 for a longtime

Specific presentations of the virtual robot images in Table 2 may bevirtual robot images shown in FIG. 12 . It should be noted that Table 2merely lists virtual robot images corresponding to some instructioninformation by way of example, and virtual robot images corresponding tomuch information are not shown in Table 2 (for example, when theinstruction information is shaking, a corresponding virtual robot imageis a dizzy image). The virtual robot images are not listed herein. Itshould be understood that the virtual robot images are merely examples,and do not constitute any limitation to information and a virtual robotimage in this application.

It should be noted that Table 2 and Table 1 in the foregoing step 201may be in a same mapping table, or may be two different mapping tables.This is not limited in this application.

In an embodiment, the processor 130 of the electronic device 100 maysearch Table 2 for the second virtual robot image corresponding to theinstruction information of the user that is received by using the inputunit 150, and then generate the third virtual robot image by merging thefirst virtual robot image and the second virtual robot image. Forexample, when the screen 1611 of the electronic device 100 currentlyalready presents the first virtual robot image being the image that isof the magnifying glass (Reading) (as shown in FIG. 6 ) and thatcorresponds to the reading type. If the processor 130 determines thatthe current instruction information of the user is knocking, theprocessor determines, according to Table 2, that a virtual robot imagecorresponding to knocking, namely, an angry (Angry) image, as the secondvirtual robot image. Then, the processor 130 generates a new virtualrobot image by merging the image (Reading) of the magnifying glass andthe angry (Angry) image. In this case, the new virtual robot imagegenerated through merging is the third virtual robot image, for example,a virtual robot image shown in FIG. 13 . For another example, when theuser wakes up the virtual robot at 24:00 in a day, and the processor 130already presents, on the screen 1611, the first virtual robot imagebeing the yawning (Idle) image (as shown in FIG. 10 ), the processor 130determines that the current instruction information of the user isfondling, and determines, according to Table 2, that a virtual robotimage corresponding to fondling, namely, a happy (Special day) image, asthe second virtual robot image. Then, the electronic device 100generates a new virtual robot image by merging the yawning (Idle) imageand the happy (Special day) image. In this case, the new virtual robotimage generated through merging is the third virtual robot image, forexample, a virtual robot image shown in FIG. 14 .

In an embodiment, the electronic device 100 may re-obtain current sceneinformation every specified duration, then re-generate a first virtualrobot image by using the method in step 201, and update and display avirtual robot image that is already presented on the screen 1611.

According to the virtual robot image presentation method provided inthis embodiment of this application, a virtual robot image is determinedbased on scene information. The scene information includes at least onepiece of information in first information and second information, thefirst information is used to represent a current time attribute, and thesecond information is used to represent a type of an applicationcurrently run in the electronic device. According to the foregoingmethod, in a human-machine interaction process, the virtual robot imagecan be richer and more vivid, so that user experience can be better,thereby improving virtual robot utilization of the user.

Based on the foregoing embodiment, an embodiment of this applicationfurther provides an example of a virtual robot image presentationmethod. Referring to FIG. 15 , a flowchart of the example may includethe following steps:

Step 1501. An electronic device turns on a virtual robot according to auser instruction, and enables the virtual robot to enter a wait mode.

Step 1502. The electronic device presents a default virtual robot image.

Step 1503. The electronic device obtains scene information.

Step 1504. The electronic device determines, based on the obtained sceneinformation, whether the virtual robot image needs to be updated, and ifthe virtual robot image needs to be updated, performs step 1505, or ifthe virtual robot image does not need to be updated, performs step 1502.

Step 1505. The electronic device determines a first virtual robot imagebased on the scene information.

Step 1506. The electronic device presents the first virtual robot image.

Step 1507. The electronic device determines whether an input operationof a user is detected, and if the input operation of the user isdetected, performs step 1508, or if the input operation of the user isnot detected, performs step 1505.

Step 1508. The electronic device determines a second virtual robot imagebased on the input operation.

Step 1509. The electronic device generates a third virtual robot imageby merging the first virtual robot image and the second virtual robotimage, and presents the third virtual robot image.

For detailed descriptions of specific implementations of the steps,refer to the related descriptions in the embodiment shown in FIG. 2 .Details are not described in this specific example again.

It should be noted that after turning on the virtual robot, theelectronic device may repeat step 1503 to step 1509 every specifiedduration. In this way, a virtual robot image can be updated in realtime, to experience latest emotion of the virtual robot in ahuman-machine interaction process, thereby improving user experience,and further improving virtual robot utilization of the user.

Based on the foregoing embodiments, an embodiment of this applicationfurther provides an electronic device 1600. The electronic device isconfigured to implement a virtual robot image presentation method shownin FIG. 2 or FIG. 15 . As shown in FIG. 16 , the electronic device 1600includes a processing unit 1601 and a display unit 1602.

The processing unit 1601 is configured to generate a first virtual robotimage. The first virtual robot image is determined by the processingunit 1601 based on scene information. The scene information includes atleast one piece of information in first information and secondinformation, the first information is used to represent a current timeattribute, and the second information is used to represent a type of anapplication currently run in the electronic device. The display unit1602 is configured to present the first virtual robot image. In anembodiment, the first information is one or more of the following:festival information, current time period information, and the like. Inan embodiment, the second information is one or more of the following: areading type, a music type, an information query type, a defaultno-operation type, and the like.

In an embodiment, the scene information further includes thirdinformation, and the third information is used to represent a naturalenvironment. In an embodiment, the third information is one or more ofthe following: weather information, temperature information, and thelike. In an embodiment, the weather information includes one or more ofthe following: normal weather information, extreme weather information,alarm weather information, current air quality information, air qualitychange information, and the like. The temperature information includesone or more of the following: current temperature information andtemperature change information. In an embodiment, the air quality changeinformation includes one or more of the following: information about anair quality change caused by a location change, information about an airquality change caused by a time change, and the like. The temperaturechange information includes one or more of the following: informationabout a temperature change caused by a location change, informationabout a temperature change caused by a time change, and the like.

In an embodiment, the electronic device further includes acommunications unit 1603. The communications unit 1603 is configured toobtain the scene information. When generating the first virtual robotimage, the processing unit 1601 is configured to determine the firstvirtual robot image based on the scene information obtained by thecommunications unit 1603.

In an embodiment, the scene information includes only one piece ofinformation; the one piece of information is the first information orthe second information; and when determining the first virtual robotimage based on the scene information, the processing unit 1601 isconfigured to determine, according to a preset mapping relationshipbetween scene information and a virtual robot image, a virtual robotimage corresponding to the one piece of information, and use thedetermined virtual robot image as the first virtual robot image.

In an embodiment, the scene information includes a plurality of piecesof information; when determining the first virtual robot image based onthe scene information, the processing unit 1601 is configured todetermine, according to a preset mapping relationship between sceneinformation and a virtual robot image, a virtual robot imagecorresponding to each of the plurality of pieces of information, andgenerate the first virtual robot image by merging the determinedplurality of virtual robot images.

In an embodiment, after the display unit 1602 presents the first virtualrobot image, when detecting an input operation of a user, the processingunit 1601 determines instruction information input by the inputoperation, determines, according to a preset mapping relationshipbetween instruction information and a virtual robot image, a secondvirtual robot image corresponding to the instruction information, andgenerates a third virtual robot image by merging the first virtual robotimage and the second virtual robot image, where the third virtual robotimage reflects scene information corresponding to the first virtualrobot image and the instruction information corresponding to the secondvirtual robot image. Then, the display unit 1602 presents the thirdvirtual robot image. In an embodiment, the input operation includes oneor more of the following operations: a voice input, a text input, and atouch operation.

In an embodiment, before generating the first virtual robot image, theprocessing unit 1601 turns on a virtual robot according to a userinstruction, and enables the virtual robot to enter a wait mode.

In an embodiment, any virtual robot image (including the first virtualrobot image, the second virtual robot image, and the third virtual robotimage) is a static image or a dynamic image.

The electronic device provided in this embodiment of this applicationgenerates the first virtual robot image, and presents the first virtualrobot image, where the first virtual robot image is determined by theelectronic device based on the scene information. The scene informationincludes at least one piece of information in the first information andthe second information, the first information is used to represent thecurrent time attribute, and the second information is used to representthe type of the application currently run in the electronic device. Inthis way, in a human-machine interaction process, the virtual robotimage can be richer and more vivid, so that user experience can bebetter, thereby improving virtual robot utilization of the user.

It should be noted that, in this embodiment of this application, unitdivision is exemplary, and is merely a logical function division. Inactual implementation, another division manner may be used. Functionalunits in the embodiments of this application may be integrated into oneprocessing unit, or each of the units may exist alone physically, or twoor more units are integrated into one unit. The integrated unit may beimplemented in a form of hardware, or may be implemented in a form of asoftware functional unit.

When the integrated unit is implemented in the form of a softwarefunctional unit and sold or used as an independent product, theintegrated unit may be stored in a computer-readable storage medium.Based on such an understanding, the technical solutions of thisapplication essentially, or the part contributing to the prior art, orall or some of the technical solutions may be implemented in the form ofa software product. The software product is stored in a storage mediumand includes several instructions for instructing a computer device(which may be a personal computer, a server, or a network device) or aprocessor to perform all or some of the steps of the methods describedin the embodiments of this application. The foregoing storage mediumincludes: any medium that can store program code, such as a USB flashdrive, a removable hard disk, a read-only memory (ROM), a random accessmemory (RAM), a magnetic disk, or an optical disc.

Based on the foregoing embodiments, an embodiment of this applicationfurther provides an electronic device 1700. The electronic device isconfigured to implement a virtual robot image presentation method shownin FIG. 2 or FIG. 15 . As is shown in FIG. 17 , the electronic device1700 includes a processor 1702 and a screen 1704. Optionally, theelectronic device 1700 further includes a communications module 1701 anda memory 1703.

The processor 1702 may be a central processing unit (CPU), a networkprocessor (NP), or a combination of the CPU and the NP. The processor1702 may further include a hardware chip. The hardware chip may be anapplication-specific integrated circuit (ASIC), a programmable logicdevice (PLD), or a combination of the ASIC and the PLD. The PLD may be acomplex programmable logic device (CPLD), a field-programmable gatearray (FPGA), a generic array logic (GAL), or any combination thereof.

The communications module 1701, the processor 1702, and the memory 1703are connected to each other. Optionally, the communications module 1701,the processor 1702, and the memory 1703 are connected to each other byusing a bus 1705. The bus 1705 may be a peripheral componentinterconnect (PCI) bus, an extended industry standard architecture(EISA) bus, or the like. The bus may be classified into an address bus,a data bus, a control bus, and the like. For ease of representation,only one thick line is used to represent the bus in FIG. 17 , but thisdoes not mean that there is only one bus or only one type of bus.

When the electronic device 1700 is configured to implement a virtualrobot image presentation method shown in FIG. 2 or FIG. 3 :

The processor 1702 is configured to generate a first virtual robotimage. The first virtual robot image is determined by the processor 1702based on scene information. The scene information includes at least onepiece of information in first information and second information, thefirst information is used to represent a current time attribute, and thesecond information is used to represent a type of an applicationcurrently run in the electronic device. The screen 1704 is configured topresent the first virtual robot image. In an embodiment, the firstinformation is one or more of the following: festival information andcurrent time period information. In an embodiment, the secondinformation is one or more of the following: a reading type, a musictype, an information query type, and a default no-operation type.

In an embodiment, the scene information further includes thirdinformation, and the third information is used to represent a naturalenvironment. For example, the third information is one or more of thefollowing: weather information and temperature information. For example,the weather information includes one or more of the following: normalweather information, extreme weather information, alarm weatherinformation, current air quality information and air quality changeinformation. The temperature information includes one or more of thefollowing: current temperature information and temperature changeinformation. For example, the air quality change information includesone or more of the following: information about an air quality changecaused by a location change and information about an air quality changecaused by a time change. The temperature change information includes oneor more of the following: information about a temperature change causedby a location change and information about a temperature change causedby a time change.

In an embodiment, when the electronic device 1700 further includes thecommunications module 1701, the communications module 1701 is configuredto obtain the scene information, where the communications module 1701may be, but is not limited to, an RF circuit, a WiFi module, acommunications interface (or a network interface or a communicationsunit), a Bluetooth module, or the like.

In an embodiment, when generating the first virtual robot image, theprocessor 1702 is configured to determine the first virtual robot imagebased on the scene information obtained by the communications module1701.

In an embodiment, the scene information includes only one piece ofinformation; the one piece of information is the first information orthe second information; and when determining the first virtual robotimage based on the scene information, the processor 1702 is configuredto determine, according to a preset mapping relationship between sceneinformation and a virtual robot image, a virtual robot imagecorresponding to the one piece of information, and use the determinedvirtual robot image as the first virtual robot image.

In an embodiment, the scene information includes a plurality of piecesof information; when determining the first virtual robot image based onthe scene information, the processor 1702 is configured to determine,according to a preset mapping relationship between scene information anda virtual robot image, a virtual robot image corresponding to each ofthe plurality of pieces of information, and generate the first virtualrobot image by merging the determined plurality of virtual robot images.

In an embodiment, after presenting the first virtual robot image on thescreen, the processor 1702 is further configured to: after detecting aninput operation of a user, determine instruction information input bythe input operation, determine, according to a preset mappingrelationship between instruction information and a virtual robot image,a second virtual robot image corresponding to the instructioninformation, generate a third virtual robot image by merging the firstvirtual robot image and the second virtual robot image, where the thirdvirtual robot image reflects scene information corresponding to thefirst virtual robot image and the instruction information correspondingto the second virtual robot image. Then, the screen 1704 presents thethird virtual robot image. In an embodiment, the input operationincludes one or more of the following operations: a voice input, a textinput, and a touch operation.

In an embodiment, before generating the first virtual robot image, theprocessor 1702 turns on a virtual robot according to a user instruction,and enables the virtual robot to enter a wait mode.

In an embodiment, any virtual robot image (including the first virtualrobot image, the second virtual robot image, and the third virtual robotimage) is a static image or a dynamic image.

In an embodiment, the memory 1703 is configured to store a program andthe like. The program may include program code, and the program codeincludes a computer operation instruction. The memory 1703 may include aRAM, or may be a non-volatile memory, for example, at least one magneticdisk memory. The processor 1702 executes the application program storedin the memory 1703 to implement the foregoing function, to implement thevirtual robot image presentation method shown in FIG. 2 or FIG. 3 .

In an embodiment, the memory 1703 is further configured to store amapping relationship between a virtual robot image and sceneinformation.

The electronic device provided in this embodiment of this applicationgenerates the first virtual robot image, and presents the first virtualrobot image, where the first virtual robot image is determined by theelectronic device based on the scene information. The scene informationincludes at least one piece of information in the first information andthe second information, the first information is used to represent thecurrent time attribute, and the second information is used to representthe type of the application currently run in the electronic device. Inthis way, in a human-machine interaction process, the virtual robotimage can be richer and more vivid, so that user experience can bebetter, thereby improving virtual robot utilization of the user.

The embodiments of this application provide the virtual robot imagepresentation method, the apparatus, and the electronic device, togenerate the first virtual robot image, and presents the first virtualrobot image, where the first virtual robot image is determined by theelectronic device based on the scene information. The scene informationincludes at least one piece of information in the first information andthe second information, the first information is used to represent thecurrent time attribute, and the second information is used to representthe type of the application currently run in the electronic device.According to the foregoing method, in a human-machine interactionprocess, the virtual robot image can be richer and more vivid, so thatuser experience can be better, thereby improving virtual robotutilization of the user.

A person skilled in the art should understand that the embodiments ofthis application may be provided as a method, a system, or a computerprogram product. Therefore, this application may use a form of hardwareonly embodiments, software only embodiments, or embodiments with acombination of software and hardware. Moreover, this application may usea form of a computer program product that is implemented on one or morecomputer-usable storage media (including but not limited to a diskmemory, a CD-ROM, an optical memory, and the like) that include computerusable program code.

This application is described with reference to the flowcharts and/orblock diagrams of the method, the device (system), and the computerprogram product according to the embodiments of this application. Itshould be understood that computer program instructions may be used toimplement each process and/or each block in the flowcharts and/or theblock diagrams and a combination of a process and/or a block in theflowcharts and/or the block diagrams. These computer programinstructions may be provided for a general-purpose computer, a dedicatedcomputer, an embedded processor, or a processor of any otherprogrammable data processing device to generate a machine, so that theinstructions executed by a computer or a processor of any otherprogrammable data processing device generate an apparatus forimplementing a specific function in one or more processes in theflowcharts and/or in one or more blocks in the block diagrams.

These computer program instructions may be stored in a computer readablememory that can instruct the computer or any other programmable dataprocessing device to work in a specific manner, so that the instructionsstored in the computer readable memory generate an artifact thatincludes an instruction apparatus. The instruction apparatus implementsa specific function in one or more processes in the flowcharts and/or inone or more blocks in the block diagrams.

These computer program instructions may be loaded onto a computer oranother programmable data processing device, so that a series ofoperations and steps are performed on the computer or the anotherprogrammable device, thereby generating computer-implemented processing.Therefore, the instructions executed on the computer or the anotherprogrammable device provide steps for implementing a specific functionin one or more processes in the flowcharts and/or in one or more blocksin the block diagrams.

Obviously, a person skilled in the art can make various modificationsand variations to embodiments of this application without departing fromthe scope of this application. This application is intended to coverthese modifications and variations provided that they fall within thescope of protection defined by the following claims and their equivalenttechnologies.

What is claimed is:
 1. A virtual robot image presentation method,applied in an electronic device having a screen, wherein the methodcomprises: generating, by the electronic device, a first virtual robotimage, wherein the first virtual robot image is determined by theelectronic device based on scene information, wherein the sceneinformation comprises at least one piece of information in firstinformation and second information, the first information is used torepresent a current time attribute, and the second information is usedto represent a type of an application currently running in theelectronic device; and presenting, by the electronic device, the firstvirtual robot image.
 2. The method according to claim 1, wherein thescene information further comprises third information, and the thirdinformation is used to represent a natural environment.
 3. The methodaccording to claim 2, wherein the third information is one or more ofthe following: weather information and temperature information.
 4. Themethod according to claim 3, wherein the weather information comprisesone or more of the following: normal weather information, extremeweather information, alarm weather information, current air qualityinformation, and air quality change information; and/or the temperatureinformation comprises one or more of the following: current temperatureinformation and temperature change information.
 5. The method accordingto claim 4, wherein the air quality change information comprises one ormore of the following: information about an air quality change caused bya location change and information about an air quality change caused bya time change; and/or the temperature change information comprises oneor more of the following: information about a temperature change causedby a location change and information about a temperature change causedby a time change.
 6. The method according to claim 1, wherein the sceneinformation comprises only one piece of information, the one piece ofinformation is the first information or the second information, and thatthe electronic device determines the first virtual robot image based onthe scene information comprises: determining, by the electronic device,according to a preset mapping relationship between scene information anda virtual robot image, a virtual robot image corresponding to the onepiece of information, and using the determined virtual robot image asthe first virtual robot image.
 7. The method according to claim 1,wherein the scene information comprises a plurality of pieces ofinformation, and that the electronic device determines the first virtualrobot image based on the scene information comprises: determining, bythe electronic device according to a preset mapping relationship betweenscene information and a virtual robot image, a virtual robot imagecorresponding to each of the plurality of pieces of information; andgenerating, by the electronic device, the first virtual robot image bymerging the determined plurality of virtual robot images.
 8. The methodaccording to claim 1, wherein after the presenting, by the electronicdevice, the first virtual robot image, the method further comprises:detecting, by the electronic device, an input operation of a user, anddetermining instruction information based on the input operation;determining, by the electronic device according to a preset mappingrelationship between instruction information and a virtual robot image,a second virtual robot image corresponding to the instructioninformation; and generating, by the electronic device, a third virtualrobot image by merging the first virtual robot image and the secondvirtual robot image, and presenting the third virtual robot image,wherein the third virtual robot image reflects scene informationcorresponding to the first virtual robot image and the instructioninformation corresponding to the second virtual robot image.
 9. Themethod according to claim 8, wherein the input operation comprises oneor more of the following operations: a voice input, a text input, and atouch operation.
 10. The method according to claim 1, wherein before thegenerating, by the electronic device, the first virtual robot image, themethod further comprises: turning on, by the electronic device accordingto a user instruction, a virtual robot, and enabling the virtual robotto enter a wait mode.
 11. An electronic device, comprising a processorand a display screen, wherein the processor is configured to generate afirst virtual robot image, wherein the first virtual robot image isdetermined by the processor based on scene information, wherein thescene information comprises at least one piece of information in firstinformation and second information, the first information is used torepresent a current time attribute, and the second information is usedto represent a type of an application currently running in theelectronic device; and the display screen is configured to present thefirst virtual robot image.
 12. The electronic device according to claim11, wherein the scene information further comprises third information,and the third information is used to represent a natural environment.13. The electronic device according to claim 12, wherein the thirdinformation is one or more of the following: weather information andtemperature information.
 14. The electronic device according to claim13, wherein the weather information comprises one or more of thefollowing: normal weather information, extreme weather information,alarm weather information, current air quality information, and airquality change information; and/or the temperature information comprisesone or more of the following: current temperature information andtemperature change information.
 15. The electronic device according toclaim 14, wherein the air quality change information comprises one ormore of the following: information about an air quality change caused bya location change and information about an air quality change caused bya time change; and/or the temperature change information comprises oneor more of the following: information about a temperature change causedby a location change and information about a temperature change causedby a time change.
 16. The electronic device according to claim 11,wherein the scene information comprises only one piece of information,the one piece of information is the first information or the secondinformation, and the processor, when determining the first virtual robotimage based on the scene information, is configured to: determine,according to a preset mapping relationship between scene information anda virtual robot image, a virtual robot image corresponding to the onepiece of information, and use the determined virtual robot image as thefirst virtual robot image.
 17. The electronic device according to claim11, wherein the scene information comprises a plurality of pieces ofinformation, and the processor, when determining the first virtual robotimage based on the scene information, is configured to: determine,according to a preset mapping relationship between scene information anda virtual robot image, a virtual robot image corresponding to each ofthe plurality of pieces of information; and generate the first virtualrobot image by merging the determined plurality of virtual robot images.18. The electronic device according to claim 11, wherein afterpresenting the first virtual robot image on the screen, the processor isfurther configured to: detect an input operation of a user, anddetermine instruction information based on the input operation;determine, according to a preset mapping relationship betweeninstruction information and a virtual robot image, a second virtualrobot image corresponding to the instruction information; and generate athird virtual robot image by merging the first virtual robot image andthe second virtual robot image, wherein the third virtual robot imagereflects scene information corresponding to the first virtual robotimage and the instruction information corresponding to the secondvirtual robot image; and the display screen is further configured topresent the third virtual robot image.
 19. The electronic deviceaccording to claim 18, wherein the input operation comprises one or moreof the following operations: a voice input, a text input, and a touchoperation.
 20. The electronic device according to claim 11, whereinbefore presenting the first virtual robot image, the processor isfurther configured to: turn on a virtual robot according to a userinstruction, and enable the virtual robot to enter a wait mode.